package com.itheima.app.exception;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobelExceptionAdvice {
    @ExceptionHandler
    public ResponseEntity businessException(Exception ex){
        return ResponseEntity.status(500).body(ex.getMessage());

    }
}
